﻿<%@ Page Title="Quản Lý Câu Hỏi Đánh Giá" Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeFile="ManagerQuestion.aspx.cs" Inherits="ManagerQuestion" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MenuPlaceHolder" Runat="Server">
    <asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" Orientation="Horizontal" OnMenuItemClick="Menu1_MenuItemClick">
        <Items>
            <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Trang chủ" Value="HomePage"></asp:MenuItem>
            <asp:MenuItem NavigateUrl="~/Login.aspx" Text ="Thoát" Value="SignOut"></asp:MenuItem>
        </Items>
    </asp:Menu>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SidebarPlaceHolder" Runat="Server">
    <asp:Menu ID="Menu2" runat="server" CssClass="Sidebar">
        <Items>
            <asp:MenuItem NavigateUrl="~/News.aspx" Text="Thông báo" Value="News"></asp:MenuItem>
            <asp:MenuItem NavigateUrl="~/About.aspx" Text="Giới thiệu" Value="About"></asp:MenuItem>
            <asp:MenuItem NavigateUrl="~/Statistics.aspx" Text="Thống kê" Value="Statistics"></asp:MenuItem>
            <asp:MenuItem NavigateUrl="~/ManagerQuestion.aspx" Text="Quản lý câu hỏi" Value ="ManagerQuestion"></asp:MenuItem>
        </Items>
    </asp:Menu>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContentPlaceHolder" Runat="Server">
   
    <asp:Label ID="lbltieudebang" Text="Bảng câu hỏi đánh giá giáo viên" runat="server" CssClass="LabelTitle"></asp:Label>
   
  
    
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="MaTC" DataSourceID="SqlDataSource1" EmptyDataText="There are no data records to display." CssClass="DataGrid" CellPadding="4" ForeColor="#333333" GridLines="None" OnRowDeleted="GridView1_RowDeleted" OnRowDeleting="GridView1_RowDeleting" OnRowUpdated="GridView1_RowUpdated">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:TemplateField HeaderText="STT">
                <ItemTemplate><%#Container.DataItemIndex+1 %></ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="MaTC" HeaderText="Mã Tiêu Chí" ReadOnly="True" SortExpression="MaTC" />
            <asp:BoundField DataField="TenTC" HeaderText="Tên Tiêu Chí" SortExpression="TenTC" />
            <asp:CommandField ShowEditButton="True">
            <ControlStyle ForeColor="Blue" />
            </asp:CommandField>
            <asp:CommandField ShowDeleteButton="True">
            <ControlStyle ForeColor="Blue" />
            </asp:CommandField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DanhGiaGiaoVienConnectionString1 %>" DeleteCommand="DELETE FROM [TieuChi] WHERE [MaTC] = @MaTC" ProviderName="<%$ ConnectionStrings:DanhGiaGiaoVienConnectionString1.ProviderName %>" SelectCommand="SELECT TieuChi.MaTC, TieuChi.TenTC FROM TieuChi" UpdateCommand="UPDATE [TieuChi] SET [MaNTC] = @MaNTC, [TenTC] = @TenTC WHERE [MaTC] = @MaTC">
        <DeleteParameters>
            <asp:Parameter Name="MaTC" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="MaTC" Type="String" />
            <asp:Parameter Name="MaNTC" Type="String" />
            <asp:Parameter Name="TenTC" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="MaNTC" Type="String" />
            <asp:Parameter Name="TenTC" Type="String" />
            <asp:Parameter Name="MaTC" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
   
    <asp:Button ID="btnThem" Text="Thêm Tiêu Chí" runat="server" OnClick="btnThem_Click" CssClass="Button" />
        
   
  
    
    <br />
    <br />
            
   
  
    
</asp:Content>